<template>
    <div class="user-item">
        <img  class="avatar" :src="user.avatar" alt="" >
        <div class="info border-bottom-1px">
            <span class="name">{{user.name}}</span>
            <!--            <span class="code" v-if="topUser!==undefined">分享人：{{topUser.name}}</span>-->
            <!--<span class="time">{{user.time}}</span>-->
            <span class="time" v-if="level!==undefined" style="color:#00d6c0">{{level.name}}{{areaName}}</span>
        </div>
    </div>
</template>

<script>
    export default {
        name: "index",
        props:{
            user:Object,
            level: {},
            topUser:{}
        },
        data(){
            return {

            }
        },
        computed:{
            areaName(){
                if (this.user.areaName){
                    return ' ('+this.user.areaName+'客服中心)'
                }else return ''
            }
        }
    }
</script>

<style scoped lang="stylus">
    .user-item
        display flex
        align-items center
        height 60px
        background-color #FFFFFF
        .avatar
            width 50px
            height 50px
            border-radius 5px
            flex 0 50px
            margin 0 15px
        .info
            margin-left 10px
            display flex
            flex-direction column
            flex 1
            justify-content center
            align-items flex-start
            border-bottom-color #DCDCDC
            height 100%
            .name
                font-size:13px;
                font-family:PingFang SC
                font-weight:300
                color:rgba(78,61,7,1)
                line-height 13px
            .code
                margin-top 6px
                font-size:11px
                font-family:PingFang SC
                font-weight:300
                color:rgba(161,161,161,1)
            .time
                font-size 10px
                color:rgba(78,61,7,0.8)
                font-weight 300
                line-height: 10px
                margin-top 6px


</style>
